class M79GasProj extends M79ClusterBombHealProjectile;

#exec OBJ LOAD FILE=M79Gas_S.uax


simulated function Explode(vector HitLocation, vector HitNormal)
{
	local PlayerController  LocalPlayer;

	bHasExploded = True;
	BlowUp(HitLocation);

	// Incendiary Effects..
	PlaySound(sound'M79Gas_S.explode_smoke',,100.5*TransientSoundVolume);

	Spawn(ProjectileClass,Instigator, '', HitLocation + HitNormal*20, Rotation);
	
	if ( EffectIsRelevant(Location,false) )
	{
		Spawn(class'UnitedMut_v54.HealExpEmitter',self,,HitLocation + HitNormal*20,rotator(HitNormal));
		Spawn(ExplosionDecal,self,,HitLocation, rotator(-HitNormal));
	}

	// Shake nearby players screens
	LocalPlayer = Level.GetLocalPlayerController();
	if ( (LocalPlayer != None) && (VSize(Location - LocalPlayer.ViewTarget.Location) < (DamageRadius * 1.5)) )
		LocalPlayer.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);
	Destroy();
}

defaultproperties
{
     ProjectileClass=Class'UnitedMut_v54.M79GasField'
     ImpactDamageType=Class'UnitedMut_v54.DamTypeAcid'
     Speed=7500.000000
     Damage=200.000000
     DamageRadius=200.000000
     MyDamageType=Class'UnitedMut_v54.DamTypeAcid'
     ExplosionDecal=Class'KFMod.FlameThrowerBurnMark'
}
